package com.iotek.ssm.service.impl;

import com.iotek.ssm.mapper.SalaryDissentMapper;
import com.iotek.ssm.pojo.CustomQueryVo;
import com.iotek.ssm.pojo.SalaryDissent;
import com.iotek.ssm.service.SalaryDissentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("salaryDissentService")
public class SalaryDissentServiceImpl implements SalaryDissentService {

    @Autowired
    private SalaryDissentMapper salaryDissentMapper;

    public void addSalaryDissent(SalaryDissent salaryDissent) throws Exception {
        salaryDissentMapper.addSalaryDissent(salaryDissent);
    }

    public void updateSalaryDissent(SalaryDissent salaryDissent) throws Exception {
        salaryDissentMapper.updateSalaryDissent(salaryDissent);
    }

    public List<SalaryDissent> findSalaryDissent(CustomQueryVo customQueryVo) throws Exception {
        return salaryDissentMapper.findSalaryDissent(customQueryVo);
    }

    public Integer getDissentCounts(CustomQueryVo customQueryVo) throws Exception {
        return salaryDissentMapper.getDissentCounts(customQueryVo);
    }

    public SalaryDissent findLastDissent(CustomQueryVo customQueryVo) throws Exception {
        return salaryDissentMapper.findLastDissent(customQueryVo);
    }
}
